//
//  ShangJiaView.m
//  lover-go-ios-beta
//
//  Created by liudonghuan on 14-8-29.
//  Copyright (c) 2014年 liudonghuan. All rights reserved.
//

#import "ShangJiaView.h"

@implementation ShangJiaView
@synthesize ShangJiaheadimage = _ShangJiaheadimage;
@synthesize ShangJiatitle = _ShangJiatitle;
@synthesize ShangJiaromantip = _ShangJiaromantip;
@synthesize ShangJiaprice = _ShangJiaprice;
@synthesize ShangJiatime = _ShangJiatime;
@synthesize ShangJiatel = _ShangJiatel;
@synthesize ShangJiaaddress = _ShangJiaaddress;
@synthesize ShangJiatuan = _ShangJiatuan;
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = LGCOLOR_gray;
        _ShangJiascrollview = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_HEIGHT, frame.size.height)];
        _ShangJiascrollview.contentSize = CGSizeMake(SCREEN_WIDTH, 630);
        _ShangJiaheadimage = [[EMAsyncImageView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 177)];
        //商家名称
        _ShangJiatitle = [[UILabel alloc]initWithFrame:CGRectMake(0, 177, SCREEN_WIDTH, 40)];
        [_ShangJiatitle setTextColor:[UIColor colorWithRed:102/255.0 green:221/255.0 blue:225/255.0 alpha:1]];
        _ShangJiatitle.font = [UIFont fontWithName:@"Helvetica" size:20];
        _ShangJiaromantip = [[UIImageView alloc]initWithFrame:CGRectMake(0, 217, SCREEN_WIDTH, 111)];
        _ShangJiaromantip.backgroundColor = [UIColor whiteColor];
        _shadowbottom = [[UIImageView alloc]initWithFrame:CGRectMake(0, 214, SCREEN_WIDTH, 3)];
        _shadowbottom.image = [UIImage imageNamed:@"bottom_black_line.png"];
        _shadowtop = [[UIImageView alloc]initWithFrame:CGRectMake(0, 329, SCREEN_WIDTH, 3)];
        _shadowtop.image = [UIImage imageNamed:@"top_black_line.png"];
        _romantip_image = [[EMAsyncImageView alloc]initWithFrame:CGRectMake(14, 10, 92, 92)];
        _romantip_title = [[UILabel alloc]initWithFrame:CGRectMake(120, 3, 150, 30)];
        [_romantip_title setTextColor:LGCOLOR_pink];
        _romantip_title.font =[UIFont fontWithName:@"Helvetica" size:15];
        _romantip_context = [[UILabel alloc]initWithFrame:CGRectMake(120, 20,190, 90)];
        [_romantip_context setNumberOfLines:4];
        _romantip_context.font =[UIFont fontWithName:@"Helvetica" size:14];
        _romantip_context.textColor = [UIColor blackColor];
        //人均开始5条
        _ShangJiaprice = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 342, SCREEN_WIDTH, 40) Flag:1];
        _ShangJiatime = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 383, SCREEN_WIDTH, 40) Flag:1];
        _ShangJiatel = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 436, SCREEN_WIDTH, 40) Flag:0];
        _ShangJiaaddress = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 477, SCREEN_WIDTH, 40) Flag:0];
        _ShangJiatuan = [[ImageLabelViewItem alloc]initWithFrame:CGRectMake(0, 518, SCREEN_WIDTH, 40) Flag:0];
        
        _ShangJiaprice.itemimage.image = [UIImage imageNamed:@"blue_ico_price"];
        _ShangJiatime.itemimage.image = [UIImage imageNamed:@"blue_ico_time"];
        _ShangJiatel.itemimage.image = [UIImage imageNamed:@"blue_ico_tel"];
        _ShangJiaaddress.itemimage.image = [UIImage imageNamed:@"blue_ico_addr"];
        _ShangJiatuan.itemimage.image = [UIImage imageNamed:@"blue_ico_more"];
        [_ShangJiaromantip addSubview:_romantip_title];
        [_ShangJiaromantip addSubview:_romantip_image];
        [_ShangJiaromantip addSubview:_romantip_context];
        [_ShangJiascrollview addSubview:_ShangJiaheadimage];
        [_ShangJiascrollview addSubview:_ShangJiatitle];
        [_ShangJiascrollview addSubview:_ShangJiaromantip];
        [_ShangJiascrollview addSubview:_ShangJiaprice];
        [_ShangJiascrollview addSubview:_ShangJiatime];
        [_ShangJiascrollview addSubview:_ShangJiatel];
        [_ShangJiascrollview addSubview:_ShangJiaaddress];
        [_ShangJiascrollview addSubview:_ShangJiatuan];
        [_ShangJiascrollview addSubview:_shadowtop];
        [_ShangJiascrollview addSubview:_shadowbottom];
        [self addSubview:_ShangJiascrollview];
    }
    
    return self;
}
-(void)deleteRomantic
{
    _ShangJiascrollview.contentSize = CGSizeMake(SCREEN_WIDTH, 550);
    _ShangJiaromantip.hidden = YES;
    _romantip_image.hidden = YES;
    _romantip_title.hidden = YES;
    _romantip_context.hidden = YES;
    _romantip_more.hidden = YES;
    _shadowtop.hidden = YES;
    _shadowbottom.hidden = YES;
    //人均开始5条
    _ShangJiaprice.frame = CGRectMake(0, 217, SCREEN_WIDTH, 40);
    _ShangJiatime.frame = CGRectMake(0, 258, SCREEN_WIDTH, 40);
    _ShangJiatel.frame = CGRectMake(0, 317, SCREEN_WIDTH, 40);
    _ShangJiaaddress.frame = CGRectMake(0, 358, SCREEN_WIDTH, 40);
    _ShangJiatuan.frame = CGRectMake(0, 399, SCREEN_WIDTH, 40);
}


/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect
 {
 // Drawing code
 }
 */

@end
